using devtm.Configuration.Models;
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Web.Profile;
using System.Web.Security;
using devtm.Editor.Configuration.Templates;
using System.ComponentModel;
using devtm.Configuration;
using devtm.Config;

namespace devtm.Editor.Configuration.Templates
{

    // @"\roleManager\providers\AspNetWindowsTokenRoleProvider"
    [TemplateDesignerAttribute("System.Configuration.ProviderSettings, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "")]
    public interface ISystemConfigurationProviderSettings
  {
  
        //[DisplayName("Name")]
        //[Description("")]
        String Name { get; set; }
  
        //[DisplayName("Type")]
        //[Description("")]
        [CustomDesignerType(typeof(Object))]
        [CustomDesignerType(typeof(RoleProvider), PathName = @"\roleManager\providers")]
        [CustomDesignerType(typeof(ProtectedConfigurationProvider), PathName = @"\configProtectedData\providers")]
        [CustomDesignerType(typeof(ProfileProvider), PathName = @"\profile\providers")]
        [CustomDesignerType(typeof(MembershipProvider), PathName = @"\membership\providers")]
        String Type { get; set; }
  
        //[DisplayName("Parameters")]
        //[Description("")]
        [PropertyItem("description", ConfigConstants.Design.StringParam, typeof(ConfigurationProviderSettingsActions), "IsRsaProtectedConfigurationProvider", "RsaDescriptionIsValid")]
        [PropertyItem("keyContainerName", ConfigConstants.Design.StringParam, typeof(ConfigurationProviderSettingsActions), "IsRsaProtectedConfigurationProvider", "RsaKeyContainerNameIsValid")]
        [PropertyItem("cspProviderName", ConfigConstants.Design.StringParam, typeof(ConfigurationProviderSettingsActions), "IsRsaProtectedConfigurationProvider", "RsaCspProviderNameIsValid")]
        [PropertyItem("useMachineContainer", ConfigConstants.Design.BoolParam, typeof(ConfigurationProviderSettingsActions), "IsRsaProtectedConfigurationProvider", "RsaUseMachineContainerIsValid")]
        [PropertyItem("useOAEP", ConfigConstants.Design.BoolParam, typeof(ConfigurationProviderSettingsActions), "IsRsaProtectedConfigurationProvider", "RsaUseOAEPIsValid")]

        [PropertyItem("description", ConfigConstants.Design.StringParam, typeof(ConfigurationProviderSettingsActions), "IsDataProtectionConfigurationProvider", "DataProtectionDescriptionIsValid")]
        [PropertyItem("useMachineProtection", ConfigConstants.Design.BoolParam, typeof(ConfigurationProviderSettingsActions), "IsDataProtectionConfigurationProvider", "DataProtectionUseMachineProtectionIsValid")]
        [PropertyItem("keyEntropy", ConfigConstants.Design.StringParam, typeof(ConfigurationProviderSettingsActions), "IsDataProtectionConfigurationProvider", "DataProtectionKeyEntropyIsValid")]        
        NameValueCollection Parameters { get; set; }

        [DisplayName("Initialize")]
        [CustomDesignerAction(typeof(ConfigurationProviderSettingsActions), "InitializeProviderSettingsRSA", DisplayName = "Initialize RSA", Parametre = TypeParametre.Section, ViewFor = "IsRsaProtectedConfigurationProvider", TypeAction = EnumAction.Undefine)]
        [CustomDesignerAction(typeof(ConfigurationProviderSettingsActions), "InitializeProviderSettingsDataprotection", DisplayName = "Initialize Data protection", Parametre = TypeParametre.Section, ViewFor = "IsDataProtectionConfigurationProvider", TypeAction = EnumAction.Undefine)]
        void Initialize();
  }

}
